package com.ruoyi.weixin.juc;

/**
 * @Description: TODO
 * @Author ONESTAR
 * @Date: 2021/12/8 20:13
 * @Version 1.0
 */
// 方便同一对象被多个线程使用
public class TestThread2 implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 2000; i++) {
            System.out.println("我在看代码---"+i);
        }
    }

    public static void main(String[] args) {
        TestThread2 testThread2 = new TestThread2();

        Thread thread = new Thread(testThread2);
        thread.run();

        for (int i = 0; i < 2000; i++) {
            System.out.println("我在学习多线程---"+i);
        }
    }
}
